<div class="row justify-content-md-center">
    <div class="col-md-4">
        <div class="card card-primary">
            <div class="card-body box-profile">
                <form role="form" action="" class="frm-operate" method="post">
                    <div class="text-center">
                        <img class="profile-user-img img-fluid img-circle" src="{:empty($User['avatar'])?'__static__/img/user.png':$User['avatar']}" alt="User profile picture">
                    </div>
                    <h3 class="profile-username text-center">{$User.nickname}</h3>

                    <p class="text-muted text-center">{$User.group_names}</p>

                    <ul class="list-group list-group-unbordered mb-3">
                        <li class="list-group-item">
                            <b>{:lang('Username')}</b><input type="text" class="form-control" value="{$User.username}" disabled="disabled" autocomplete="off">
                        </li>
                        <li class="list-group-item">
                            <b>{:lang('Nickname')}</b><input type="text" class="form-control" name="nickname" value="{$User.nickname}" autocomplete="off">
                        </li>
                        <li class="list-group-item">
                            <b>{:lang('Email')}</b><input type="text" class="form-control" name="email" value="{$User.email}" autocomplete="off">
                        </li>
                        <li class="list-group-item">
                            <b>{:lang('Password')}</b><input type="text" class="form-control" name="password" placeholder="{:lang('Do not modify the password, no need to fill in')}" autocomplete="off">
                        </li>
                    </ul>

                    <div class="col-sm-10">
                        <input type="hidden" name="id" value="{$User.id}">
                        <button type="submit" class="btn btn-primary btn-submit">{:lang('Submit')}</button>
                        <button type="reset" class="btn btn-default">{:lang('Reset')}</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{block:script}
<script>
    require(['jquery','layer','Form'], function ($,undefined,Form) {
        Form.api.init({success:function (data) {
            layer.msg('{:lang("Operation completed")}', {time:2000, icon:1}, function () {
                window.location.reload();
            });
            return false;
        }});
    })
</script>
{/block:script}